package com.lottery.im.api.result.entity;

import android.databinding.BaseObservable;
import android.text.TextUtils;

public class CanReceiveData0 {

  /**
   * returnCode : 0000
   * returnMessage : 可以领取
   * returnList : null
   * returnMap : {"signDetail":"1：可以修改|2：修改成功的","value":"20"}
   * totalCount : 0
   * data : null
   */

  private String returnCode;
  private String returnMessage;
  private Object returnList;
  private ReturnMapBean returnMap;
  private int totalCount;
  private Object data;

  public String getReturnCode() {
    return returnCode;
  }

  public void setReturnCode(String returnCode) {
    this.returnCode = returnCode;
  }

  public String getReturnMessage() {
    return returnMessage;
  }

  public void setReturnMessage(String returnMessage) {
    this.returnMessage = returnMessage;
  }

  public Object getReturnList() {
    return returnList;
  }

  public void setReturnList(Object returnList) {
    this.returnList = returnList;
  }

  public ReturnMapBean getReturnMap() {
    return returnMap;
  }

  public void setReturnMap(ReturnMapBean returnMap) {
    this.returnMap = returnMap;
  }

  public int getTotalCount() {
    return totalCount;
  }

  public void setTotalCount(int totalCount) {
    this.totalCount = totalCount;
  }

  public Object getData() {
    return data;
  }

  public void setData(Object data) {
    this.data = data;
  }

  public static class ReturnMapBean extends BaseObservable {
    /**
     * signDetail : 1：可以修改|2：修改成功的
     * value : 20
     */
    private String signDetail;
    private String value;
    private String btnMsg;
    private boolean canClick;

    public String getSignDetail() {
      if(!TextUtils.isEmpty(signDetail)){
        return signDetail.replaceAll("\\|","\n");
      }else{
        return signDetail;
      }
    }

    public void setSignDetail(String signDetail) {
      this.signDetail = signDetail;
    }
    public String getValue() {
      return value;
    }

    public void setValue(String value) {
      this.value = value;
    }

    public String getBtnMsg(String code) {
      if(!TextUtils.isEmpty(code)){
        if("0000".equals(code)){
          return "立即领取";
        }else if("0001".equals(code)){
          return "不可领取";
        }else{
          return "己领取";
        }
      }else{
        return btnMsg;
      }
    }

    public void setBtnMsg(String btnMsg) {
      this.btnMsg=btnMsg;
    }

    public boolean isCanClick(String code) {
      if("0000".equals(code)){
        return true;
      }else{
        return false;
      }
    }

    public void setCanClick(boolean canClick) {
      this.canClick=canClick;
    }
  }
}
